import { Controller, Get, Param, Query } from '@nestjs/common';
import { TemplatesService } from './templates.service';
import { GetTemplateListDto } from './dto/get-template-list.dto';

@Controller('templates')
export class TemplatesController {
  constructor(private readonly templatesService: TemplatesService) { }

  @Get()
  async getTemplateList(@Query() query: GetTemplateListDto) {
    return this.templatesService.getTemplateList(query);
  }

  // 获取模板详情
  @Get(':id')
  async getTemplateDetail(@Param('id') id: string) {
    return this.templatesService.getTemplateDetail(id);
  }
} 